package org.example.neo4j.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private BirdRepository birdRepository;

    @GetMapping
    public String hello() {
        BirdEntity birdEntity = new BirdEntity();
        birdEntity.setName("Bird");
        birdEntity.setHongmo("hongmo");
        birdEntity.setJiao("jiao");
        birdEntity.setZui("zui");
        birdEntity.setMu("mu");
        birdRepository.save(birdEntity);
        return "Hello World";
    }
}
